unit Confirmation;

interface

uses
  Classes, SysUtils, Controls,
  RaApplication, RaBase, RaControlsVCL, Forms;

type

  TMethod = procedure () of object;

  TfrmConfirmation = class(TRaFormCompatible)
    btnSave: TRaBitButton;
    btnCancel: TRaBitButton;
    lblMsg: TRaLabel;
    procedure btnSaveClick(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
  private
    { Private declarations }
  public
    OkMethod: TMethod;
    CancelMethod: TMethod;
    procedure Show(Caption, Msg: string);
  end;

var
  frmConfirmation: TfrmConfirmation;

implementation

{$R *.dfm}

{ TfrmConfirmation }

procedure TfrmConfirmation.btnCancelClick(Sender: TObject);
begin
  close;
end;

procedure TfrmConfirmation.btnSaveClick(Sender: TObject);
begin
  OkMethod;
  close;
end;

procedure TfrmConfirmation.Show(Caption, Msg: string);
begin
  lblMsg.Caption := Msg;
  inherited Show;
end;

end.
